package main

import (
	"fmt"
)

func main() {

	//定义局部变量
	grade := "B"
	marks := 90

	switch marks {
	case 90:
		grade = "A"
	case 80:
		grade = "B"
	case 50, 60, 70:
		grade = "C"
	default:
		grade = "D" //其他分数为D
	}

	switch {
	case grade == "A":
		fmt.Println("优秀！\n")
	case grade == "B", grade == "c":
		fmt.Println("良好\n")
	case grade == "D":
		fmt.Println("不及格\n")
	}
	fmt.Println("你的等级是: ", grade)
}
